home *** CD-ROM | disk | FTP | other *** search
/ PC Media 20 / PC MEDIA CD20.iso / share / prog / asm105 / asm.txt < prev    next >
Encoding:
Text File  |  1995-09-14  |  3.7 KB  |  75 lines

  1. Magic Assembler v1.05 - Documentation
  2. ═══════════════════════════════════════════════════════════════════════════════
  3. Magic Assembler is a public domain assembly language compiler, which can
  4. produce as well as COM files as boot sector programs. Compiling to COM files
  5. can be done using the command line like this:
  6. ┌────────────────┐
  7. │ ASM MYPROG.ASM │
  8. └────────────────┘
  9. To put the program in the boot sector of a disk wich is in drive A, the command
  10. line should be like this:
  11. ┌────────────────────┐
  12. │ ASM MYPROG.ASM B:A │
  13. └────────────────────┘
  14. Note that if you want to make a boot program, you should include a code like
  15. this:
  16. ┌─────────────────────────┐
  17. │         mov     ax,07c0 │
  18. │         mov     ds,ax   │
  19. │         mov     es,ax   │
  20. │         mov     ss,ax   │
  21. └─────────────────────────┘
  22. This is because DOS isn't loaded, so DOS cannot set the correct memory settings
  23. before running. All bootsector programs are loaded at 07c0:0000, so that's why
  24. include this code.
  25. ═══════════════════════════════════════════════════════════════════════════════
  26. The commands included with this assembler are the standard assembly commands,
  27. but there are some exeptions. There are three different JMP commands, and 2
  28. different CALL commands. Below the difference are discussed:
  29.  
  30. JMPS    jumps 128 bytes back to 127 bytes further, and uses 2 bytes of code.
  31. JMP     jumps 32768 bytes back to 32767 bytes further, and uses 3 bytes of 
  32.         code.
  33. JMPF    jumps to every possible place in the low memory, and uses 5 bytes of 
  34.         code.
  35. CALL    see JMP, but with this the RET function can be used.
  36. CALLF   see JMPF, but with this the RET function can be used.
  37. ═══════════════════════════════════════════════════════════════════════════════
  38. Variables can be declared with the following functions:
  39.  
  40.         DB      byte(s)         declares a byte, but can also be used to 
  41.                                 declare multiple bytes.
  42.         DW      word(s)         declares a word, but can also be used to 
  43.                                 declare mutiple words.
  44.         DS      x bytes         declares a free array of x bytes.
  45.         DBE     filename.ext    this function puts a file in the compiled 
  46.                                 version, supposing that the file is build of
  47.                                 bytes.
  48.         DWE     filename.ext    this function puts a file in the compiled
  49.                                 version, supposing that the file is build of
  50.                                 words.
  51.  
  52. With DB and DW you can also put a ? instead of a value.
  53. If you want to declare data, for which only space in memory must be reserved, 
  54. but no space on disk, you should put them on the end of the source. Before you 
  55. declare that data you must put an empty line before them, containing only a '-' 
  56. on the first place. See the example programs for details.
  57. ═══════════════════════════════════════════════════════════════════════════════
  58. You do not need to tell the assembler that a procedure is a procedure, so you
  59. can declare a procedure like this:
  60. ┌─────────────────────────┐
  61. │ cls     mov     ax,0003 │
  62. │         int     10      │
  63. │         ret             │
  64. └─────────────────────────┘
  65. You can then in the program put the line
  66. ┌─────────────────────┐
  67. │         call    cls │
  68. └─────────────────────┘
  69. ═══════════════════════════════════════════════════════════════════════════════
  70. I hope you'll enjoy the Magic Assembler. If you have any questions or 
  71. suggestions about the assembler, the documenation or the sample programs, you 
  72. can write me on E-mail bert.greevenbosch@mmm.xs4all.nl
  73. ═══════════════════════════════════════════════════════════════════════════════
  74. Magic Assembler was written by Bert Greevenbosch for Magic Software.
  75.